//
//  CustomField.m
//  Rong360
//
//  Created by tianliwei on 15/2/14.
//  Copyright (c) 2014 tianliwei. All rights reserved.
//

#import "CustomField.h"

@implementation CustomField

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
    }
    return self;
}


//禁止粘贴等操作
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender
{
    return NO;
}


//禁止出现放大镜
-(void)addGestureRecognizer:(UIGestureRecognizer *)gestureRecognizer
{
    //Prevent zooming but not panning
    if ([gestureRecognizer isKindOfClass:[UILongPressGestureRecognizer class]])
    {
        gestureRecognizer.enabled = NO;
    }
    [super addGestureRecognizer:gestureRecognizer];
    return;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
